<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>{maccms:name} - 用戶登录</title>
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" id="viewport" name="viewport">
<link href="{maccms:path}template/user/css/login.css" type="text/css" rel="stylesheet"/>
<meta content="{maccms:description}" name="Description">
<meta content="{maccms:keywords}" name="Keywords">
<meta content="telephone=no" name="format-detection" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<meta http-equiv="Cache-Control" content="no-transform" />
<meta content="{maccms:name}" name="apple-mobile-web-app-title">
<script>var SitePath='{maccms:path}',SiteAid='{maccms:siteaid}',SiteTid='{maccms:sitetid}',SiteId='{maccms:siteid}';</script>
<script src="{maccms:path}js/jquery.js"></script>
<script src="{maccms:path}js/common.js"></script>
<script src="{maccms:path}template/user/js/formValidator-4.0.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){	
	$("body").bind('keyup',function(event) {
		if(event.keyCode==13){ $('#btnLogin').click(); }
	}); 
	$('#btnLogin').click(function() {
		if ($('#u_name').val()  == '') { alert('请输入用户名！'); $("#u_name").focus(); return false; }
		if ($('#u_password').val()  == '') { alert('请输入密码！'); $("#u_password").focus(); return false; }
		$("#form1").submit();
	});
});
</script>
	
</head>
<body>
<div id="sign-logo"></div>

<div class="login-wrapper">
<form id="loginform_web" method="post" action="index.php?m=user-check.html">
  <input id="flag" name="flag" type="hidden" value="center">
  <section class="box">
    <div class="input-wrapper"> <i class="icon forName"></i>
      <p class="input-box">
        <input type="text" placeholder="请输入用戶名" id="u_name" name="u_name">
      </p>
    </div>
    <div class="input-wrapper"> <i class="icon forPwd"></i>
      <p class="input-box">
        <input type="password" placeholder="请输入密码" id="u_password" name="u_password">
      </p>
    </div>
  </section>
  <a href="javascript:void(0);" onclick="javascript:document.forms[0].submit();" class="btn btnRed" id="btnLogin">登录</a>
</form>
<p class="label"><a href="{maccms:path}index.php?m=user-reg-ref-qqlogin.html"><img src="{maccms:path}template/user/images/qq_login.gif" alt="" style="width:200px;"/></a></p>
<footer class="footer"> <a href="index.php?m=user-reg.html">注册账号</a><span style="margin:0 5px;color:#c8c8c8">|</span><a href="index.php?m=user-findpass.html">忘记密码</a> </footer>
</div>
<script type="text/javascript">
		$.formValidator.initConfig({
			formID:"loginform_web",
			debug:false,
			submitOnce:false,
			onSuccess:function(){
				//alert('dddddddddddddd');
				$("#loginform_web").qiresub({
					curobj:$("#loginform_web #loginbt"),
					txt:'资料提交中,請稍後...',
					onsucc:function(result){
						$.hidediv(result);
					}
				}).post({url:'/user-login-viluser'});
				return false;
			},
			onError:function(msg,obj,errorlist){
				$("#errorlist").empty();
				$.map(errorlist,function(msg){
					$("#errorlist").append("<li>" + msg + "</li>")
				});
				//alert(msg);
			},
			submitAfterAjaxPrompt : '有资料正在非同步验证，请稍等...'
		});
		$("#loginform_web #u_name").formValidator({
			onShow:"请输入正确的的用戶名",
			onFocus:"用户名至少四位",
			onCorrect:"填写正确"
		})
		.inputValidator({
			min:4,
			onError:"你输入的用戶名不正确,请重新输入"
		});
		$("#loginform_web #u_password").formValidator({
			onShow:"请输入密码密碼",
			onFocus:"密码至少6位",
			onCorrect:"密码合法"
		})
		.inputValidator({
			min:6,
			empty:{
				leftEmpty:false,
				rightEmpty:false,
				emptyError:"密码两边不能有空格"
			},
			onError:"你輸入的密码不正确,请重新输入"
		});
	</script>
	{foot}
</body>
</html>
